console.log("loading: proxy.js");
function Proxy() {};
Proxy.create = function (scope, func, params) {
	//console.log("Proxy.create()");
  // When the proxy function is called, use the apply( ) method to call
  // the method that is supposed to get called by proxy. The apply( )
  // method allows you to specify a different scope (scope) and pass
  // the parameters as an array.
  var fProxy = function() {
  	var args = new Array();
  	for (var i = 0; i < arguments.length; i++) {
  		args.push(arguments[i]);
  	}
  	args.push(params);
  	//Log.debug("args.length: " + args.length);
    func.apply(scope, args);
  };
  return fProxy;
};

Proxy.createSimple = function(scope,func){
	return function (arg){
		return func.call(scope,arg);
	};
};
